php add year to date

34

$end = date('Y-m-d', strtotime('+5 years'));
//variable date
$date = "2022-02-01";
$newDate = date('Y-m-d', strtotime($date. ' + 3 years'));

//curent date
$newDate = date('Y-m-d', strtotime(' + 3 years'));

Comments

Submit
0 Comments